home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Views
/
ViewCell
/
ViewCell.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
1KB
|
64 lines
// ViewCell.cp
#ifndef ViewCell_h
#include "ViewCell.h"
#endif
#ifndef CursorObject_h
#include "CursorObject.h"
#endif
#ifndef CellVisitor_h
#include "CellVisitor.h"
#endif
#ifndef Canvas_h
#include "Canvas.h"
#endif
void ViewCell::Deliver( CellVisitor& visitor, const Canvas& canvas )
{
Assert( visitor.Destination().Intersects( canvas.OnScreen() ) );
visitor.Visit( *this, canvas );
}
void ViewCell::Click( const Canvas&,
const MouseDownEvent& )
{
}
void ViewCell::ActivatingClick( const Canvas&,
const MouseDownEvent& )
{
}
const CursorObject& ViewCell::Cursor( const Canvas&,
const MouseEvent&,
RegionObject& ) const
{
return CursorObject::Arrow();
}
ViewCell& ViewCell::Blank()
{
class BlankCell: virtual public ViewCell
{
public:
virtual void Draw( const Canvas& canvas ) const
{ EraseRect( &canvas.OnScreen() ); }
};
static BlankCell blank;
return blank;
}
ViewCell& ViewCell::Black()
{
class BlackCell: virtual public ViewCell
{
public:
virtual void Draw( const Canvas& canvas ) const
{ PaintRect( &canvas.OnScreen() ); }
};
static BlackCell black;
return black;
}